#ifndef SUPERMARKETMANAGESYSTEM_USER_H
#define SUPERMARKETMANAGESYSTEM_USER_H

#include <QString>
#include <QJsonObject>

class User
{
public:
    QString name;
    QString account;
    QString password;
    bool isAdmin;

    User(const QString &name,
         const QString &account,
         const QString &password,
         bool isAdmin);

    User(QJsonObject obj);

    QJsonObject toJsonObject() const;

    bool operator==(const User &rhs) const;

    bool operator!=(const User &rhs) const;

};


#endif //SUPERMARKETMANAGESYSTEM_USER_H
